import request from '@/utils/request'

const api_name = '/api/order'

export default {

    fakeCreateJsapi(orderNo) {
        return request({
            url: `${api_name}/wxPay/fakeCreateJsapi/${orderNo}`,
            method: 'get'
        })
    },

    fakeQueryPayStatus(orderNo) {
        return request({
            url: `${api_name}/wxPay/fakeQueryPayStatus/${orderNo}`,
            method: 'get'
        })
    },
    
    // 订单支付
    createJsapi(orderNo) {
        return request({
            url: `${api_name}/wxPay/createJsapi/${orderNo}`,
            method: 'get'
        })
    },

    // 订单信息
    getInfo(orderId) {
        return request({
            url: `${api_name}/orderInfo/getInfo/${orderId}`,
            method: 'get'
        })
    },

    submitOrder(orderFormVo) {
        return request({
            url: `${api_name}/orderInfo/submitOrder`,
            method: 'post',
            data: orderFormVo
        })
    },


    findListByUserId() {
        return request({
            url: `${api_name}/orderInfo/findListByUserId`,
            method: 'get'
        })
    },

    // findListPage2(pageNo, pageSize) {
    //     return request({
    //         url: `/admin/order/orderInfo/${pageNo}/${pageSize}`,
    //         method: 'get'
    //     })
    // },

    findCourseListByUserId() {
        return request({
            url: `${api_name}/orderInfo/findCourseListByUserId`,
            method: 'get'
        })
    }
}
